package com.wejoy.video.middle.station.api.app;

import com.wejoy.video.middle.station.api.filter.LoginFilter;
import com.wejoy.video.middle.station.api.filter.SignFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//import com.wejoy.bxgz.api.filter.OpenApiFilter;

/**
 * @author 向帅
 * @Date 2019/9/10 17:59
 **/
@Configuration
public class InterceptorConfiguration extends WebMvcConfigurationSupport {
    @Autowired
    private LoginFilter loginFilter;
    @Autowired
    private SignFilter signFilter;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginFilter).addPathPatterns("/**/*");
//        registry.addInterceptor(signFilter).addPathPatterns("/api/*");
        super.addInterceptors(registry);
    }
}
